package designmode;

/**
 * @Author fallrain
 * @Description 设计模式--单例模式
 * @Date 2022/2/11 14:26
 * @Version 1.0
 */
public class SingletonMode04 {

    private static SingletonMode04 singletonMode04;

    private SingletonMode04(){}

    public static synchronized SingletonMode04 getInstance(){
        if(singletonMode04 == null){
            singletonMode04 = new SingletonMode04();
        }
        return singletonMode04;
    }
}
